//
//  LJLClassificationPageCVC.m
//  聆听FM
//
//  Created by dllo on 16/6/6.
//  Copyright © 2016年 Dark. All rights reserved.
//

#import "LJLClassificationPageCVC.h"
#import "UIImageView+WebCache.h"
@implementation LJLClassificationPageCVC

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {        
        self.picIV = [[UIImageView alloc] init];
        [self.contentView addSubview:_picIV];
        self.textL = [[UILabel alloc] init];
        self.textL.backgroundColor = [UIColor clearColor];
        self.textL.textColor = [UIColor whiteColor];
        self.textL.font = [UIFont systemFontOfSize:14];
        [self.contentView addSubview:_textL];
    }
    return self;
}
- (void)layoutSubviews
{
    [super layoutSubviews];
    self.picIV.frame = CGRectMake(20 * FITWIDTH, 5 * FITHEIGHT, 30 * FITWIDTH, 30 * FITHEIGHT);
    self.textL.frame = CGRectMake(60 * FITWIDTH, 5 * FITHEIGHT, 80 * FITWIDTH, 30 * FITHEIGHT);
}
- (void)setModel:(LJLClassificationPageModel *)model
{
    if (_model != model) {
        _model = model;
        [self.picIV sd_setImageWithURL:[NSURL URLWithString:model.coverPath] placeholderImage:[UIImage sd_animatedGIFNamed:@"占位图"]];
        self.textL.text = model.title;
    }
    
}

@end
